public abstract class Protocol
extends java.lang.Object
implements java.lang.Runnable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Domain |
domain
--
|
protected java.lang.Thread |
negoThread |
protected int |
sessionNr |
boolean |
stopNegotiation
stopNegotiation indicates that the session has now ended.
|
protected int |
totalSessions |
protected TournamentRunner |
tournamentRunner |
| Constructor and Description |
|---|
Protocol(AgentRepItem[] agentRepItems,
ProfileRepItem[] profileRepItems,
java.util.HashMap<AgentParameterVariable,AgentParamValue>[] agentParams,
int totalMatches) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNegotiationEventListener(NegotiationEventListener listener) |
void |
fireBilateralAtomicNegotiationSessionEvent(BilateralAtomicNegotiationSession session,
ProfileRepItem profileA,
ProfileRepItem profileB,
AgentRepItem agentA,
AgentRepItem agentB,
java.lang.String agenAName,
java.lang.String agentBName) |
void |
fireLogMessage(java.lang.String source,
java.lang.String log) |
void |
fireNegotiationActionEvent(Agent actorP,
Action actP,
int roundP,
long elapsed,
double time,
double utilA,
double utilB,
double utilADiscount,
double utilBDiscount,
java.lang.String remarks,
boolean finalActionEvent) |
java.lang.String |
getAgentName(int index) |
java.util.HashMap<AgentParameterVariable,AgentParamValue> |
getAgentParams(int index) |
AgentRepItem |
getAgentRepItem(int index) |
UtilitySpace |
getAgentUtilitySpaces(int index) |
Domain |
getDomain() |
abstract java.lang.String |
getName() |
java.util.ArrayList<NegotiationEventListener> |
getNegotiationEventListeners() |
abstract NegotiationOutcome |
getNegotiationOutcome() |
int |
getNumberOfAgents() |
ProfileRepItem |
getProfileRepItems(int index) |
int |
getSessionNumber() |
int |
getTotalSessions() |
static java.util.ArrayList<Protocol> |
getTournamentSessions(Tournament tournament) |
int |
hashCode() |
protected void |
loadAgentsUtilitySpaces() |
void |
removeNegotiationEventListener(NegotiationEventListener listener) |
void |
setTournamentRunner(TournamentRunner runner) |
void |
startSession() |
void |
stopNegotiation() |
java.lang.String |
toString() |
protected java.lang.Thread negoThread
protected TournamentRunner tournamentRunner
public boolean stopNegotiation
protected Domain domain
protected int sessionNr
protected int totalSessions
public Protocol(AgentRepItem[] agentRepItems, ProfileRepItem[] profileRepItems, java.util.HashMap<AgentParameterVariable,AgentParamValue>[] agentParams, int totalMatches) throws java.lang.Exception
java.lang.Exceptionpublic abstract java.lang.String getName()
public abstract NegotiationOutcome getNegotiationOutcome()
public static java.util.ArrayList<Protocol> getTournamentSessions(Tournament tournament) throws java.lang.Exception
java.lang.Exceptionpublic final void startSession()
protected void loadAgentsUtilitySpaces()
throws java.lang.Exception
java.lang.Exceptionpublic void addNegotiationEventListener(NegotiationEventListener listener)
public java.util.ArrayList<NegotiationEventListener> getNegotiationEventListeners()
public void removeNegotiationEventListener(NegotiationEventListener listener)
public void fireNegotiationActionEvent(Agent actorP, Action actP, int roundP, long elapsed, double time, double utilA, double utilB, double utilADiscount, double utilBDiscount, java.lang.String remarks, boolean finalActionEvent)
public void fireBilateralAtomicNegotiationSessionEvent(BilateralAtomicNegotiationSession session, ProfileRepItem profileA, ProfileRepItem profileB, AgentRepItem agentA, AgentRepItem agentB, java.lang.String agenAName, java.lang.String agentBName)
public void fireLogMessage(java.lang.String source,
java.lang.String log)
public void setTournamentRunner(TournamentRunner runner)
public Domain getDomain()
public AgentRepItem getAgentRepItem(int index)
public ProfileRepItem getProfileRepItems(int index)
public java.lang.String getAgentName(int index)
public java.util.HashMap<AgentParameterVariable,AgentParamValue> getAgentParams(int index)
public UtilitySpace getAgentUtilitySpaces(int index)
public int getNumberOfAgents()
public void stopNegotiation()
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int getSessionNumber()
public int getTotalSessions()